<div id="post_container">
    <div id="post_pending_wrapper">
        <p id="message"><?php echo $error.$success; ?></p>
        <table id="pending_table">
            <th id="pending_title">Title</th>
            <th id="pending_author">Author</th>
            <th id="pending_view"></th>
            <th id="pending_approve"></th>
            <th id="pending_reject"></th>
            <?php foreach ($pending as $pending_item): ?>
            <tr>
                <td class="td_left"><?php echo '<a href="pending/approve/'.$pending_item['post_id'].'">'.$pending_item['title'].'</a>'; ?></td>
                <td class="td_left"><?php echo $pending_item['lname'].','.$pending_item['fname']; ?></td>
                <td class="td_center"><?php echo anchor('post/pending/approve/'.$pending_item['post_id'], 'View');?></td>
                <td class="td_center"><?php echo anchor('post/pending/approve_now/'.$pending_item['post_id'], 'Approve', array('onClick' => "return confirm('Are you sure you want to approve this post?')"));?></td>
                <td class="td_center"><?php echo anchor('post/pending/reject/'.$pending_item['post_id'], 'Reject');?></td>
            </tr>
            <?php endforeach; ?>
        </table>
    </div>
</div>
